<template lang="pug">
.modal-wrap
  .modal(:class="{'d-block': show}")
    userInfo
    switchLession
    addLession
    tutorUse
    tutorModifyTime
    databaseTest
    answerDis
    QRCode
    knowledgePoint
    addBook
    addNode
    alert
    localTest
</template>
<script>
import userInfo from './user-info.vue'
import switchLession from './switch-lession.vue'
import addLession from './add-lession.vue'
import tutorUse from './tutor-reuse.vue'
import tutorModifyTime from './tutor-modify-time.vue'
import databaseTest from './database-test.vue'
import answerDis from './answer-dis.vue'
import QRCode from './qr-code.vue'
import knowledgePoint from './knowledge-point.vue'
import addBook from './add-book.vue'
import addNode from './add-node.vue'
import alert from './alert.vue'
import localTest from './local-test.vue'
export default {
  computed: {
    show () {
      return this.$store.state.modal.show
    }
  },
  components: {
    userInfo,
    switchLession,
    addLession,
    tutorUse,
    tutorModifyTime,
    databaseTest,
    answerDis,
    QRCode,
    knowledgePoint,
    addBook,
    addNode,
    alert,
    localTest
  },
  mounted () {
    if (/^\/teacher/.test(this.$route.path)) {
      $(this.$el).addClass('teacher')
    } else {
      $(this.$el).removeClass('teacher')
    }
  }
}
</script>

<style lang="scss">
.modal {
  background: rgba(0,0,0,.4);
  z-index: 1;
  .modal-dialog {
    pointer-events: auto;
  }
}
</style>
